package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.ContactNoteDao;
import com.kaishengit.entity.ContactNote;
import com.kaishengit.entity.UserProject;
import com.kaishengit.util.DateUtil;
import com.kaishengit.util.PkUtil;

public class ContactNoteService {
	
	private ContactNoteDao contactNoteDao=new ContactNoteDao();
	
	public void save(String content, String contactId, UserProject userProject) {
		ContactNote cn=new ContactNote();
		cn.setContent(content);
		cn.setId(PkUtil.getId());
		cn.setCreatetime(DateUtil.getNowDateTime());
		cn.setUser(userProject.getUser());
		cn.setUserId(userProject.getUser().getId());
		cn.setContactId(contactId);
		contactNoteDao.save(cn);
		
		
	}

	public List<ContactNote> findById(String id) {
		return contactNoteDao.findById(id);
	}

	public void del(String id) {
		contactNoteDao.del(id);
		
	}
		
}
